<template>
    <view class="n-component-nButtonTopRightFloat">
        <button class="n-component-nButtonTopRightFloat-btn cu-btn bg-nddyny shadow-blur round" @tap="_tap">{{title}}</button>
    </view>
</template>

<script>
    export default {
        props: ['title', 'tap', 'uri'],
        methods: {
            _tap() {
                if (this.tap) {
                    this.tap();
                }
                if (this.uri) {
                    this.$store.commit('userNavTo', this.uri);
                }
            }
        }
    }
</script>

<style lang="less">
    .n-component-nButtonTopRightFloat {
        position: relative;

        .n-component-nButtonTopRightFloat-btn {
            z-index: 1;
            position: absolute;
            padding: 36rpx 46rpx;
            top: 20rpx;
            right: 26rpx;
        }
    }
</style>
